#pragma once
#include <QObject>
#include <QUdpSocket>
#include <QDebug>

class MainServer : public QObject {
    Q_OBJECT
public:
    static const int port = 9999;
    static MainServer* instance() { static MainServer server; return &server; }

    explicit MainServer(QObject* parent = nullptr);

    QUdpSocket* udpSocket;
private slots:
    void onReadyRead();

};
